﻿<include file="top" />
<form>
<table width="100%">
	<tr class="h">
		<td width="20" align="center"><input type="checkbox" value="0" name="Id" onclick="F('input[name=Id]').check(this.checked);" /></td>
		<td>用户名</td><td>时间</td><td>IP</td><td>模块</td><td>动作</td><td>描述</td><td>状态</td></tr>
<loop name="OperateLogs">
	<tr class="l">
		<td><input type="checkbox" value="{$OperateLogs.Id}" name="Id" /></td>
		<td>{$OperateLogs.UserName}</td>
		<td>{$OperateLogs.OperateDateTime:F.untimespan}</td>
		<td>{$OperateLogs.ClientIpAddress}</td>
		<td>{$OperateLogs.Model}</td>
		<td>{$OperateLogs.Action}</td>
		<td>{$OperateLogs.Description:F.encodeHTML}</td>
		<td>{$OperateLogs.Status}</td>
	</tr>
</loop>
	<tr class="l"><td colspan="8"><input type="button" value="删除所选" onclick="DeleteMuti(this.form);" />&nbsp; <page for="OperateLogs" /></td></tr>
</table>
</form>
<div id="DialogAlert"></div>
<script type="text/javascript">
function DeleteMuti(frm){
	var val=[];
	F(frm).find('input[name=Id]').each(function(){
		if(this.checked)val.push(this.value);					 
	});
	if(val.length==0){
		F("#DialogAlert").attr("title","批量删除").html("请选择要删除的记录！").dialog({
			"width":400,"height":300,buttons:{
				"确定":function(){}
			}
		});
	}else{
		F("#DialogAlert").attr("title","批量删除").html("确定要删除选中的记录吗？").dialog({
			"width":400,"height":300,buttons:{
				"确定":function(){
					window.location="?m=OperateLogs&page={$Mo.Get.Int.page}&a=delete&Id="+val.join(",");
				}
			}
		});
	}
}
</script>
<include file="foot" />